package com.hdaccp.foodsales.controller;

import com.hdaccp.foodsales.dao.kucunDao;
import com.hdaccp.foodsales.entity.Shangpin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/kcs")
@Scope("prototype")
public class kucunController {
    @Autowired
    private kucunDao kucunDao;

    @RequestMapping("/all")
    @ResponseBody
    public List<Shangpin>all(){
        return kucunDao.get();
    }



}
